<script setup>
import { ref } from 'vue';
import { useUserStore } from '@/stores/user';
const active = ref(0);
</script>

<template>
    <div class="footer-div">
        <router-link to="/home"><van-icon size="0.2rem" name="home-o" />首页</router-link>
        <router-link to="/video"><van-icon size="0.2rem" name="video-o" />视频</router-link>
        <router-link to="/messages"><van-icon size="0.2rem" name="chat-o" />消息</router-link>
        <router-link :to="useUserStore().isLogin ? '/my/recent':'/my'"><van-icon size="0.2rem" name="friends-o" />{{ useUserStore().isLogin ? '我的' : '未登录' }}</router-link>

    </div>
</template>


<style lang="scss" scoped>
.footer-div {
    height: 0.5rem;
    user-select: none;
    display: flex;
    font-size: 0.16rem;
    a {
        color: black;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    .router-link-active {
        color: #f66;
    }
}
</style>